/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * infoFrame.java
 *
 * Created on May 5, 2010, 12:37:17 PM
 */

package seqbuster;

import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

/**
 *
 * @author lpantano
 */
public class ResultViewXML extends javax.swing.JDialog {

    /** Creates new form infoFrame */
    public ResultViewXML(javax.swing.JDialog parent) {
        super(parent);
        initComponents();
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        butclose = new javax.swing.JButton();
        jScrollPane2 = new javax.swing.JScrollPane();
        xml = new javax.swing.JTextPane();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(seqbuster.SeqBusterApp.class).getContext().getResourceMap(ResultViewXML.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        butclose.setText(resourceMap.getString("butclose.text")); // NOI18N
        butclose.setName("butclose"); // NOI18N
        butclose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                butcloseActionPerformed(evt);
            }
        });

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        xml.setContentType(resourceMap.getString("xml.contentType")); // NOI18N
        xml.setName("xml"); // NOI18N
        jScrollPane2.setViewportView(xml);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(298, 298, 298)
                        .addComponent(butclose, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 747, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(22, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 492, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(butclose)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void butcloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_butcloseActionPerformed
        // TODO add your handling code here:
        dispose();
    }//GEN-LAST:event_butcloseActionPerformed

   public void infoxml (String urlxml) throws MalformedURLException, IOException{
        URL resURL = new URL(urlxml);
        xml.setPage(resURL);
    }


    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton butclose;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTextPane xml;
    // End of variables declaration//GEN-END:variables

}
